package homework;

import java.util.ArrayList;
import java.util.function.Consumer;

/**
 * @classname:EmployTest
 * @description:
 * @author: Mr.Z
 * @date: 2020/12/11 17:57
 * @version: 0.1
 * @since:1.8
 */
public class EmployTest {
    public static void main(String[] args) {
        Employee se = new SE("张三",23,2300);
        Employee manger = new Manager("李四",24,2500,1000);
        ArrayList<Employee> list = new ArrayList();
        list.add(se);
        list.add(manger);

        list.forEach(new Consumer<Employee>() {
            @Override
            public void accept(Employee employee) {
                employee.showInfo();
            }
        });
    }
}
